package com.sixth.controller;

import com.sixth.bean.common.BasePageInfo;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.service.AdminLogService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName AdminLogController
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/8 16:43
 **/

@RestController
@RequestMapping("admin/log")
public class AdminLogController {

    @Autowired
    AdminLogService adminLogService;


    /**
     * 显示查询日志分页数据
     * @Param
     * @Return
     * @author XiaoWJ
     * @date   2022/9/8 16:51
     */

    @RequiresPermissions(value = "admin:log:list",logical = Logical.OR)
    @RequestMapping("list")
    public BaseRespVo list(BasePageInfo basePageInfo, String name) {
        Object result = adminLogService.list(basePageInfo, name);
        return BaseRespVo.ok(result);

    }

}
